import ajax from '@/utils/ajax'

/**
 * @module 交接班操作
 */

// 获取接班时间
export const getChangeoverTime = params => ajax.post('handover/queryHandoverTimeRange', params)

// 交接班操作(获取交接班信息)
export const takeHandover = params => ajax.post('handover/makeHandoverInfo', params)

// 确认交接班
export const confirmHandover = params => ajax.post('handover/confirmHandover', params)

// 获取服务器当前时间
export const getCurrentTime = () => ajax.post('handover/serverTime')

/**
 * @module 交接班记录
 */

// 查询交接班记录
export const getChangeAndShiftTimeList = params => ajax.post('handover/queryHandoverRecordsByPge', params)

// 导出交接班记录
export const exportHandoverList = params => ajax.post('handover/exportHandoverRecords', params)

// 导出交接班记录详情整体交易明细
export const exportDutyByDutyId = params => ajax.post('handover/exportDutyByDutyId', params)

// 导出交接班记录详情油号交易汇总
export const exportOilDutyByDutyId = params => ajax.post('handover/exportOilDutyByDutyId', params)

// 导出交接班记录详情油枪交易汇总
export const exportGunDutyByDutyId = params => ajax.post('handover/exportGunDutyByDutyId', params)

/**
 * @module 交接班详情
 */

// 获取交接班详情
export const getHandoverDetail = params => ajax.post('handover/getGasDutyDetailById', params)

// 补打小票(交接班)
export const makeUpTicket = params => ajax.post('handover/printReceipts', params)
